package com.hk.model;

import java.util.Date;
import java.util.List;

/**
 * @Author: KangWang
 * Date: 2021/5/18 16:23
 * State：新闻简介
 */
public class News {

    private int newsId;
    private String newsTitle;
    private String newsSubhead;//副标题
    private String newsContent;//新闻类容
    private Date releaseDate;//发布日期
    private int hits;//浏览次数
    private int typeId;//对应新闻类型ID
//  不与数据库对应
    private NewsType newsType; //对应新闻类型

    public int getNewsId() {
        return newsId;
    }

    public void setNewsId(int newsId) {
        this.newsId = newsId;
    }

    public String getNewsTitle() {
        return newsTitle;
    }

    public void setNewsTitle(String newsTitle) {
        this.newsTitle = newsTitle;
    }

    public String getNewsSubhead() {
        return newsSubhead;
    }

    public void setNewsSubhead(String newsSubhead) {
        this.newsSubhead = newsSubhead;
    }

    public String getNewsContent() {
        return newsContent;
    }

    public void setNewsContent(String newsContent) {
        this.newsContent = newsContent;
    }

    public Date getReleaseDate() {
        return releaseDate;
    }

    public void setReleaseDate(Date releaseDate) {
        this.releaseDate = releaseDate;
    }

    public int getHits() {
        return hits;
    }

    public void setHits(int hits) {
        this.hits = hits;
    }

    public int getTypeId() {
        return typeId;
    }

    public void setTypeId(int typeId) {
        this.typeId = typeId;
    }

    public NewsType getNewsType() {
        return newsType;
    }

    public void setNewsType(NewsType newsType) {
        this.newsType = newsType;
    }

    public News(int newsId, String newsTitle, String newsSubhead, String newsContent, Date releaseDate, int hits, int typeId) {
        this.newsId = newsId;
        this.newsTitle = newsTitle;
        this.newsSubhead = newsSubhead;
        this.newsContent = newsContent;
        this.releaseDate = releaseDate;
        this.hits = hits;
        this.typeId = typeId;
    }

    public News() {

    }

    @Override
    public String toString() {
        return "News{" +
                "newsId=" + newsId +
                ", newsTitle='" + newsTitle + '\'' +
                ", newsSubhead='" + newsSubhead + '\'' +
                ", newsContent='" + newsContent + '\'' +
                ", releaseDate=" + releaseDate +
                ", hits=" + hits +
                ", typeId=" + typeId +
                ", newsType='" + newsType + '\'' +
                '}';
    }
}
